package day3.fight;

public class silvercard extends card
{
    public silvercard(String number, String name, String phonenumber, double money) {
        super(number, name, phonenumber, money);
    }

    public silvercard() {
    }

    @Override
    public void consume(double money)
    {
        System.out.println("余额为"+getMoney()+"您当前消费：" + money + "优惠后为：" + money * 0.9);

        if(getMoney()>=money*0.9)
        {   setMoney(getMoney()-money*0.9);
            System.out.println("剩余：" + getMoney());}

        else System.out.println("余额不足");
        return;
    }
}
